using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MimeCloud.AssetManagement.Business;
using System.Windows;
using MimeCloud.AssetManagement.Business.Interface;

namespace MimeCloud.AssetManagement.DigitalLibrary.Dialogs
{
    public class AssetOpenerWindowBase : Window
    {
        public IAssetContainer ParentAssetContainer { get; set; }

        public void OpenAssetsInParent(IList<IAsset> childAssets)
        {
            if (ParentAssetContainer != null && childAssets != null && childAssets.Count > 0)
            {
                foreach (var asset in childAssets)
                {
                    ParentAssetContainer.OpenAsset(asset);
                }
            }
        }
    }
}
